<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">--</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Cmm optimisation</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- (c) The University of Glasgow 2006</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Cmm.Opt</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-10"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Opt.html#constantFoldNode"><span class="hs-identifier">constantFoldNode</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Opt.html#constantFoldExpr"><span class="hs-identifier">constantFoldExpr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier">cmmMachOpFold</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier">cmmMachOpFoldM</span></a></span><span>
</span><span id="line-14"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Utils.html"><span class="hs-identifier">GHC.Cmm.Utils</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span id="local-6989586621681026535"><span id="local-6989586621681026536"><span class="annot"><a href="GHC.Cmm.Opt.html#constantFoldNode"><span class="hs-identifier hs-type">constantFoldNode</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681026536"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681026535"><span class="hs-identifier hs-type">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Node.html#CmmNode"><span class="hs-identifier hs-type">CmmNode</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681026536"><span class="hs-identifier hs-type">e</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681026535"><span class="hs-identifier hs-type">x</span></a></span></span></span><span>
</span><span id="line-30"></span><span id="constantFoldNode"><span class="annot"><span class="annottext">constantFoldNode :: forall (e :: Extensibility) (x :: Extensibility).
Platform -&gt; CmmNode e x -&gt; CmmNode e x
</span><a href="GHC.Cmm.Opt.html#constantFoldNode"><span class="hs-identifier hs-var hs-var">constantFoldNode</span></a></span></span><span> </span><span id="local-6989586621681026409"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026409"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
forall (e :: Extensibility) (x :: Extensibility).
(CmmExpr -&gt; CmmExpr) -&gt; CmmNode e x -&gt; CmmNode e x
</span><a href="GHC.Cmm.Node.html#mapExp"><span class="hs-identifier hs-var">mapExp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#constantFoldExpr"><span class="hs-identifier hs-var">constantFoldExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026409"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="annot"><a href="GHC.Cmm.Opt.html#constantFoldExpr"><span class="hs-identifier hs-type">constantFoldExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-33"></span><span id="constantFoldExpr"><span class="annot"><span class="annottext">constantFoldExpr :: Platform -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#constantFoldExpr"><span class="hs-identifier hs-var hs-var">constantFoldExpr</span></a></span></span><span> </span><span id="local-6989586621681026407"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026407"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; CmmExpr) -&gt; CmmExpr -&gt; CmmExpr
</span><a href="GHC.Cmm.Node.html#wrapRecExp"><span class="hs-identifier hs-var">wrapRecExp</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621681026405"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-34"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681026405"><span class="annot"><span class="annottext">f :: CmmExpr -&gt; CmmExpr
</span><a href="#local-6989586621681026405"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026400"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026400"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681026399"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681026399"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026407"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026400"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681026399"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="#local-6989586621681026405"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmRegOff"><span class="hs-identifier hs-type">CmmRegOff</span></a></span><span> </span><span id="local-6989586621681026397"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026397"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-var">CmmReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026397"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="#local-6989586621681026405"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span id="local-6989586621681026395"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026395"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026395"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- MachOp constant folder</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">-- Now, try to constant-fold the MachOps.  The arguments have already</span><span>
</span><span id="line-42"></span><span class="hs-comment">-- been optimized and folded.</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-type">cmmMachOpFold</span></a></span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MachOp"><span class="hs-identifier hs-type">MachOp</span></a></span><span>       </span><span class="hs-comment">-- The operation from an CmmMachOp</span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">]</span><span>    </span><span class="hs-comment">-- The optimized arguments</span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span id="cmmMachOpFold"><span class="annot"><span class="annottext">cmmMachOpFold :: Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var hs-var">cmmMachOpFold</span></a></span></span><span> </span><span id="local-6989586621681026394"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026394"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026393"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026393"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621681026392"><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681026392"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr -&gt; CmmExpr
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026393"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681026392"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026394"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026393"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><a href="#local-6989586621681026392"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-comment">-- Returns Nothing if no changes, useful for Hoopl, also reduces</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- allocation!</span><span>
</span><span id="line-54"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-type">cmmMachOpFoldM</span></a></span><span>
</span><span id="line-55"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MachOp"><span class="hs-identifier hs-type">MachOp</span></a></span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-59"></span><span>
</span><span id="line-60"></span><span id="cmmMachOpFoldM"><span class="annot"><span class="annottext">cmmMachOpFoldM :: Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var hs-var">cmmMachOpFoldM</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681026390"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026390"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026387"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681026386"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026386"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-61"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026390"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-62"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Neg"><span class="hs-identifier hs-type">MO_S_Neg</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026386"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Not"><span class="hs-identifier hs-type">MO_Not</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer
forall a. Bits a =&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#complement"><span class="hs-identifier hs-var">complement</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026386"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span>        </span><span class="hs-comment">-- these are interesting: we must first narrow to the</span><span>
</span><span id="line-66"></span><span>        </span><span class="hs-comment">-- &quot;from&quot; type, in order to truncate to the correct size.</span><span>
</span><span id="line-67"></span><span>        </span><span class="hs-comment">-- The final narrow/widen to the destination type</span><span>
</span><span id="line-68"></span><span>        </span><span class="hs-comment">-- is implicit in the CmmLit.</span><span>
</span><span id="line-69"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_SF_Conv"><span class="hs-identifier hs-type">MO_SF_Conv</span></a></span><span> </span><span id="local-6989586621681026381"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026381"><span class="hs-identifier hs-var">_from</span></a></span></span><span> </span><span id="local-6989586621681026380"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026380"><span class="hs-identifier hs-var">to</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Rational -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmFloat"><span class="hs-identifier hs-var">CmmFloat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Rational
forall a. Num a =&gt; Integer -&gt; a
</span><a href="../../base/src/GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026380"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_SS_Conv"><span class="hs-identifier hs-type">MO_SS_Conv</span></a></span><span>  </span><span id="local-6989586621681026377"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026377"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681026376"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026376"><span class="hs-identifier hs-var">to</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026377"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026376"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-type">MO_UU_Conv</span></a></span><span>  </span><span id="local-6989586621681026373"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026373"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681026372"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026372"><span class="hs-identifier hs-var">to</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026373"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026372"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>      </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_XX_Conv"><span class="hs-identifier hs-type">MO_XX_Conv</span></a></span><span>  </span><span id="local-6989586621681026369"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026369"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681026368"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026368"><span class="hs-identifier hs-var">to</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026369"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026387"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026368"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-73"></span><span>
</span><span id="line-74"></span><span>      </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; CmmExpr
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; CmmExpr) -&gt; String -&gt; CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmmMachOpFoldM: unknown unary op: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026390"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="hs-comment">-- Eliminate conversion NOPs</span><span>
</span><span id="line-78"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_SS_Conv"><span class="hs-identifier hs-type">MO_SS_Conv</span></a></span><span> </span><span id="local-6989586621681026365"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026365"><span class="hs-identifier hs-var">rep1</span></a></span></span><span> </span><span id="local-6989586621681026364"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026364"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026363"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026363"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026365"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026364"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026363"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-79"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-type">MO_UU_Conv</span></a></span><span> </span><span id="local-6989586621681026362"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026362"><span class="hs-identifier hs-var">rep1</span></a></span></span><span> </span><span id="local-6989586621681026361"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026361"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026360"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026360"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026362"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026361"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026360"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-80"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_XX_Conv"><span class="hs-identifier hs-type">MO_XX_Conv</span></a></span><span> </span><span id="local-6989586621681026359"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026359"><span class="hs-identifier hs-var">rep1</span></a></span></span><span> </span><span id="local-6989586621681026358"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026358"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026357"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026357"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026359"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026358"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026357"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-comment">-- Eliminate nested conversions where possible</span><span>
</span><span id="line-83"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026356"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026356"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026355"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026355"><span class="hs-identifier hs-var">conv_outer</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026354"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026354"><span class="hs-identifier hs-var">conv_inner</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026353"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026353"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span class="hs-special">]</span><span>
</span><span id="line-84"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681026352"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681026351"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681026350"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026350"><span class="hs-identifier hs-var">signed1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe (Width, Width, Bool)
</span><a href="#local-6989586621681026349"><span class="hs-identifier hs-var">isIntConversion</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026354"><span class="hs-identifier hs-var">conv_inner</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-85"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>   </span><span id="local-6989586621681026348"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681026347"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026347"><span class="hs-identifier hs-var">signed2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe (Width, Width, Bool)
</span><a href="#local-6989586621681026349"><span class="hs-identifier hs-var">isIntConversion</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026355"><span class="hs-identifier hs-var">conv_outer</span></a></span><span>
</span><span id="line-86"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-87"></span><span>        </span><span class="hs-comment">-- widen then narrow to the same size is a nop</span><span>
</span><span id="line-88"></span><span>      </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026353"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-89"></span><span>        </span><span class="hs-comment">-- Widen then narrow to different size: collapse to single conversion</span><span>
</span><span id="line-90"></span><span>        </span><span class="hs-comment">-- but remember to use the signedness from the widening, just in case</span><span>
</span><span id="line-91"></span><span>        </span><span class="hs-comment">-- the final conversion is a widen.</span><span>
</span><span id="line-92"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-93"></span><span>            </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026356"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Width -&gt; Width -&gt; MachOp
</span><a href="#local-6989586621681026343"><span class="hs-identifier hs-var">intconv</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026350"><span class="hs-identifier hs-var">signed1</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026353"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-comment">-- Nested widenings: collapse if the signedness is the same</span><span>
</span><span id="line-95"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026350"><span class="hs-identifier hs-var">signed1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026347"><span class="hs-identifier hs-var">signed2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-96"></span><span>            </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026356"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Width -&gt; Width -&gt; MachOp
</span><a href="#local-6989586621681026343"><span class="hs-identifier hs-var">intconv</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026350"><span class="hs-identifier hs-var">signed1</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026353"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-97"></span><span>        </span><span class="hs-comment">-- Nested narrowings: collapse</span><span>
</span><span id="line-98"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026351"><span class="hs-identifier hs-var">rep2</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-99"></span><span>            </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026356"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-var">MO_UU_Conv</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026352"><span class="hs-identifier hs-var">rep1</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026348"><span class="hs-identifier hs-var">rep3</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026353"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-100"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-101"></span><span>            </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-102"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-103"></span><span>        </span><span id="local-6989586621681026349"><span class="annot"><span class="annottext">isIntConversion :: MachOp -&gt; Maybe (Width, Width, Bool)
</span><a href="#local-6989586621681026349"><span class="hs-identifier hs-var hs-var">isIntConversion</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-type">MO_UU_Conv</span></a></span><span> </span><span id="local-6989586621681026342"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026342"><span class="hs-identifier hs-var">rep1</span></a></span></span><span> </span><span id="local-6989586621681026341"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026341"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Width, Width, Bool) -&gt; Maybe (Width, Width, Bool)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026342"><span class="hs-identifier hs-var">rep1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026341"><span class="hs-identifier hs-var">rep2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>        </span><span class="annot"><a href="#local-6989586621681026349"><span class="hs-identifier hs-var">isIntConversion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_SS_Conv"><span class="hs-identifier hs-type">MO_SS_Conv</span></a></span><span> </span><span id="local-6989586621681026340"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026340"><span class="hs-identifier hs-var">rep1</span></a></span></span><span> </span><span id="local-6989586621681026339"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026339"><span class="hs-identifier hs-var">rep2</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Width, Width, Bool) -&gt; Maybe (Width, Width, Bool)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026340"><span class="hs-identifier hs-var">rep1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026339"><span class="hs-identifier hs-var">rep2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>
</span><span id="line-107"></span><span>        </span><span class="annot"><a href="#local-6989586621681026349"><span class="hs-identifier hs-var">isIntConversion</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Width, Width, Bool)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-108"></span><span>
</span><span id="line-109"></span><span>        </span><span id="local-6989586621681026343"><span class="annot"><span class="annottext">intconv :: Bool -&gt; Width -&gt; Width -&gt; MachOp
</span><a href="#local-6989586621681026343"><span class="hs-identifier hs-var hs-var">intconv</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_SS_Conv"><span class="hs-identifier hs-var">MO_SS_Conv</span></a></span><span>
</span><span id="line-110"></span><span>        </span><span class="annot"><a href="#local-6989586621681026343"><span class="hs-identifier hs-var">intconv</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-var">MO_UU_Conv</span></a></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-comment">-- ToDo: a narrow of a load can be collapsed into a narrow load, right?</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- but what if the architecture only supports word-sized loads, should</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- we do the transformation anyway?</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026338"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026337"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026337"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026336"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681026335"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026335"><span class="hs-identifier hs-var">xrep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026334"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-117"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026337"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-118"></span><span>        </span><span class="hs-comment">-- for comparisons: don't forget to narrow the arguments before</span><span>
</span><span id="line-119"></span><span>        </span><span class="hs-comment">-- comparing, since they might be out of range.</span><span>
</span><span id="line-120"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-type">MO_Eq</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-121"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Ne"><span class="hs-identifier hs-type">MO_Ne</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-type">MO_U_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-124"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-type">MO_U_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-type">MO_U_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-type">MO_U_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-type">MO_S_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026321"><span class="hs-identifier hs-var">x_s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026320"><span class="hs-identifier hs-var">y_s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-129"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-type">MO_S_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026321"><span class="hs-identifier hs-var">x_s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026320"><span class="hs-identifier hs-var">y_s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-130"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-type">MO_S_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026321"><span class="hs-identifier hs-var">x_s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026320"><span class="hs-identifier hs-var">y_s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-type">MO_S_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026321"><span class="hs-identifier hs-var">x_s</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026320"><span class="hs-identifier hs-var">y_s</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026338"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span> </span><span id="local-6989586621681026315"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026315"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026315"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span> </span><span id="local-6989586621681026312"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026312"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026312"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span> </span><span id="local-6989586621681026310"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026310"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026310"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Quot"><span class="hs-identifier hs-type">MO_U_Quot</span></a></span><span> </span><span id="local-6989586621681026307"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026307"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026307"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Rem"><span class="hs-identifier hs-type">MO_U_Rem</span></a></span><span>  </span><span id="local-6989586621681026304"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026304"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#rem"><span class="hs-operator hs-var">`rem`</span></a></span><span>  </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var">y_u</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026304"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Quot"><span class="hs-identifier hs-type">MO_S_Quot</span></a></span><span> </span><span id="local-6989586621681026301"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026301"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026301"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Rem"><span class="hs-identifier hs-type">MO_S_Rem</span></a></span><span>  </span><span id="local-6989586621681026299"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026299"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Real.html#rem"><span class="hs-operator hs-var">`rem`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026299"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_And"><span class="hs-identifier hs-type">MO_And</span></a></span><span>   </span><span id="local-6989586621681026297"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026297"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026297"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Or"><span class="hs-identifier hs-type">MO_Or</span></a></span><span>    </span><span id="local-6989586621681026294"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026294"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%7C."><span class="hs-operator hs-var">.|.</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026294"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Xor"><span class="hs-identifier hs-type">MO_Xor</span></a></span><span>   </span><span id="local-6989586621681026291"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026291"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#xor"><span class="hs-operator hs-var">`xor`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026291"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Shl"><span class="hs-identifier hs-type">MO_Shl</span></a></span><span>   </span><span id="local-6989586621681026288"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026288"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftL"><span class="hs-operator hs-var">`shiftL`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026288"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-146"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Shr"><span class="hs-identifier hs-type">MO_U_Shr</span></a></span><span> </span><span id="local-6989586621681026285"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026285"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var">x_u</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026285"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Shr"><span class="hs-identifier hs-type">MO_S_Shr</span></a></span><span> </span><span id="local-6989586621681026282"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026282"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; Integer
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#shiftR"><span class="hs-operator hs-var">`shiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026282"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>        </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-152"></span><span>        </span><span id="local-6989586621681026332"><span class="annot"><span class="annottext">x_u :: Integer
</span><a href="#local-6989586621681026332"><span class="hs-identifier hs-var hs-var">x_u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026335"><span class="hs-identifier hs-var">xrep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-153"></span><span>        </span><span id="local-6989586621681026331"><span class="annot"><span class="annottext">y_u :: Integer
</span><a href="#local-6989586621681026331"><span class="hs-identifier hs-var hs-var">y_u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026335"><span class="hs-identifier hs-var">xrep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-154"></span><span>        </span><span id="local-6989586621681026321"><span class="annot"><span class="annottext">x_s :: Integer
</span><a href="#local-6989586621681026321"><span class="hs-identifier hs-var hs-var">x_s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026335"><span class="hs-identifier hs-var">xrep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026336"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-155"></span><span>        </span><span id="local-6989586621681026320"><span class="annot"><span class="annottext">y_s :: Integer
</span><a href="#local-6989586621681026320"><span class="hs-identifier hs-var hs-var">y_s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026335"><span class="hs-identifier hs-var">xrep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026334"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- When possible, shift the constants to the right-hand side, so that we</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- can match for strength reductions.  Note that the code generator will</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- also assume that constants have been shifted to the right when</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- possible.</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026281"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026281"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026280"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026280"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026279"><span class="annot"><span class="annottext">x :: CmmExpr
</span><a href="#local-6989586621681026279"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026278"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026278"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-164"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isLit"><span class="hs-identifier hs-var">isLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026278"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Bool
</span><a href="GHC.Cmm.MachOp.html#isCommutableMachOp"><span class="hs-identifier hs-var">isCommutableMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026280"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-165"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026281"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026280"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026278"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026279"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="hs-comment">-- Turn (a+b)+c into a+(b+c) where possible.  Because literals are</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- moved to the right, it is more likely that we will find</span><span>
</span><span id="line-169"></span><span class="hs-comment">-- opportunities for constant folding when the expression is</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- right-associated.</span><span>
</span><span id="line-171"></span><span class="hs-comment">--</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- ToDo: this appears to introduce a quadratic behaviour due to the</span><span>
</span><span id="line-173"></span><span class="hs-comment">-- nested cmmMachOpFold.  Can we fix this?</span><span>
</span><span id="line-174"></span><span class="hs-comment">--</span><span>
</span><span id="line-175"></span><span class="hs-comment">-- Why do we check isLit arg1?  If arg1 is a lit, it means that arg2</span><span>
</span><span id="line-176"></span><span class="hs-comment">-- is also a lit (otherwise arg1 would be on the right).  If we</span><span>
</span><span id="line-177"></span><span class="hs-comment">-- put arg1 on the left of the rearranged expression, we'll get into a</span><span>
</span><span id="line-178"></span><span class="hs-comment">-- loop:  (x1+x2)+x3 =&gt; x1+(x2+x3)  =&gt; (x2+x3)+x1 =&gt; x2+(x3+x1) ...</span><span>
</span><span id="line-179"></span><span class="hs-comment">--</span><span>
</span><span id="line-180"></span><span class="hs-comment">-- Also don't do it if arg1 is PicBaseReg, so that we don't separate the</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- PicBaseReg from the corresponding label (or label difference).</span><span>
</span><span id="line-182"></span><span class="hs-comment">--</span><span>
</span><span id="line-183"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026274"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026274"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026273"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026273"><span class="hs-identifier hs-var">mop1</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026272"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026272"><span class="hs-identifier hs-var">mop2</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026271"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026271"><span class="hs-identifier hs-var">arg1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681026270"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026270"><span class="hs-identifier hs-var">arg2</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026269"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026269"><span class="hs-identifier hs-var">arg3</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-184"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026272"><span class="hs-identifier hs-var">mop2</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; MachOp -&gt; Bool
</span><a href="#local-6989586621681026268"><span class="hs-operator hs-var">`associates_with`</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026273"><span class="hs-identifier hs-var">mop1</span></a></span><span>
</span><span id="line-185"></span><span>     </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isLit"><span class="hs-identifier hs-var">isLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026271"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-var">isPicReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026271"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026274"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026272"><span class="hs-identifier hs-var">mop2</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026271"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026274"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026273"><span class="hs-identifier hs-var">mop1</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026270"><span class="hs-identifier hs-var">arg2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026269"><span class="hs-identifier hs-var">arg3</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-188"></span><span>     </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span id="local-6989586621681026268"><span class="annot"><span class="annottext">associates_with :: MachOp -&gt; MachOp -&gt; Bool
</span><a href="#local-6989586621681026268"><span class="hs-operator hs-var hs-var">`associates_with`</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-189"></span><span>     </span><span id="local-6989586621681026264"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026264"><span class="hs-identifier hs-var">mop1</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621681026268"><span class="hs-operator hs-var">`associates_with`</span></a></span><span> </span><span id="local-6989586621681026263"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026263"><span class="hs-identifier hs-var">mop2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-190"></span><span>        </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026264"><span class="hs-identifier hs-var">mop1</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; MachOp -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026263"><span class="hs-identifier hs-var">mop2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Bool
</span><a href="GHC.Cmm.MachOp.html#isAssociativeMachOp"><span class="hs-identifier hs-var">isAssociativeMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026264"><span class="hs-identifier hs-var">mop1</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span class="hs-comment">-- special case: (a - b) + c  ==&gt;  a + (c - b)</span><span>
</span><span id="line-193"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026261"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026261"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026260"><span class="annot"><span class="annottext">mop1 :: MachOp
</span><a href="#local-6989586621681026260"><span class="hs-identifier hs-var">mop1</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026259"><span class="annot"><span class="annottext">mop2 :: MachOp
</span><a href="#local-6989586621681026259"><span class="hs-identifier hs-var">mop2</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026258"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026258"><span class="hs-identifier hs-var">arg1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681026257"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026257"><span class="hs-identifier hs-var">arg2</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026256"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026256"><span class="hs-identifier hs-var">arg3</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-194"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isLit"><span class="hs-identifier hs-var">isLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026258"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-var">isPicReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026258"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026261"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026260"><span class="hs-identifier hs-var">mop1</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026258"><span class="hs-identifier hs-var">arg1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026261"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026259"><span class="hs-identifier hs-var">mop2</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026256"><span class="hs-identifier hs-var">arg3</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026257"><span class="hs-identifier hs-var">arg2</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="hs-comment">-- special case: (PicBaseReg + lit) + N  ==&gt;  PicBaseReg + (lit+N)</span><span>
</span><span id="line-198"></span><span class="hs-comment">--</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- this is better because lit+N is a single link-time constant (e.g. a</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- CmmLabelOff), so the right-hand expression needs only one</span><span>
</span><span id="line-201"></span><span class="hs-comment">-- instruction, whereas the left needs two.  This happens when pointer</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- tagging gives us label+offset, and PIC turns the label into</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- PicBaseReg + label.</span><span>
</span><span id="line-204"></span><span class="hs-comment">--</span><span>
</span><span id="line-205"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026255"><span class="annot"><span class="annottext">op :: MachOp
</span><a href="#local-6989586621681026255"><span class="hs-identifier hs-var">op</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026254"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026254"><span class="hs-identifier hs-var">pic</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span id="local-6989586621681026253"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026253"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-206"></span><span>                          </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026252"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026252"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681026251"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026251"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-207"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-var">isPicReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026254"><span class="hs-identifier hs-var">pic</span></a></span><span>
</span><span id="line-208"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026255"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026254"><span class="hs-identifier hs-var">pic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmLit -&gt; CmmExpr) -&gt; CmmLit -&gt; CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmOffsetLit"><span class="hs-identifier hs-var">cmmOffsetLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026253"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681026249"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-209"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681026249"><span class="annot"><span class="annottext">off :: Int
</span><a href="#local-6989586621681026249"><span class="hs-identifier hs-var hs-var">off</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026251"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026252"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>
</span><span id="line-211"></span><span class="hs-comment">-- Make a RegOff if we can</span><span>
</span><span id="line-212"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span id="local-6989586621681026246"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026246"><span class="hs-identifier hs-var">reg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026245"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026245"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681026244"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026244"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-213"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; Int -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmRegOff"><span class="hs-identifier hs-var">cmmRegOff</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026246"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026244"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026245"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmRegOff"><span class="hs-identifier hs-type">CmmRegOff</span></a></span><span> </span><span id="local-6989586621681026242"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026242"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681026241"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681026241"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026240"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026240"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681026239"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026239"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-215"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; Int -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmRegOff"><span class="hs-identifier hs-var">cmmRegOff</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026242"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681026241"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026239"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026240"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span id="local-6989586621681026238"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026238"><span class="hs-identifier hs-var">reg</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026237"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026237"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681026236"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026236"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-217"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; Int -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmRegOff"><span class="hs-identifier hs-var">cmmRegOff</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026238"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026236"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026237"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-218"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmRegOff"><span class="hs-identifier hs-type">CmmRegOff</span></a></span><span> </span><span id="local-6989586621681026235"><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026235"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681026234"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681026234"><span class="hs-identifier hs-var">off</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026233"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026233"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621681026232"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026232"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-219"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg -&gt; Int -&gt; CmmExpr
</span><a href="GHC.Cmm.Utils.html#cmmRegOff"><span class="hs-identifier hs-var">cmmRegOff</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><a href="#local-6989586621681026235"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681026234"><span class="hs-identifier hs-var">off</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026232"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026233"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span class="hs-comment">-- Fold label(+/-)offset into a CmmLit where possible</span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span id="local-6989586621681026231"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026231"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026230"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026230"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681026229"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026229"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-224"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmOffsetLit"><span class="hs-identifier hs-var">cmmOffsetLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026231"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026229"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026230"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026228"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026228"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681026227"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026227"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span id="local-6989586621681026226"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026226"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-226"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmOffsetLit"><span class="hs-identifier hs-var">cmmOffsetLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026226"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026227"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026228"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span id="local-6989586621681026225"><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026225"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026224"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026224"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681026223"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026223"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-228"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CmmLit -&gt; Int -&gt; CmmLit
</span><a href="GHC.Cmm.Utils.html#cmmOffsetLit"><span class="hs-identifier hs-var">cmmOffsetLit</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit
</span><a href="#local-6989586621681026225"><span class="hs-identifier hs-var">lit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026223"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026224"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-229"></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="hs-comment">-- Comparison of literal with widened operand: perform the comparison</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- at the smaller width, as long as the literal is within range.</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">-- We can't do the reverse trick, when the operand is narrowed:</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- narrowing throws away bits from the operand, there's no way to do</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- the same comparison at the larger size.</span><span>
</span><span id="line-237"></span><span>
</span><span id="line-238"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026222"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026222"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026221"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026221"><span class="hs-identifier hs-var">cmp</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-type">CmmMachOp</span></a></span><span> </span><span id="local-6989586621681026220"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026220"><span class="hs-identifier hs-var">conv</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026219"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026219"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026218"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026218"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-239"></span><span>  </span><span class="hs-glyph">|</span><span>     </span><span class="hs-comment">-- powerPC NCG has a TODO for I8/I16 comparisons, so don't try</span><span>
</span><span id="line-240"></span><span>    </span><span class="annot"><span class="annottext">Platform -&gt; Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformArch"><span class="hs-identifier hs-var">platformArch</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026222"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Arch -&gt; [Arch] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchX86"><span class="hs-identifier hs-var">ArchX86</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Arch
</span><a href="../../ghc-boot/src/GHC.Platform.html#ArchX86_64"><span class="hs-identifier hs-var">ArchX86_64</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-comment">-- if the operand is widened:</span><span>
</span><span id="line-242"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681026213"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026213"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026212"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026212"><span class="hs-identifier hs-var">signed</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026211"><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="#local-6989586621681026211"><span class="hs-identifier hs-var">narrow_fn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe (Width, Bool, Width -&gt; Integer -&gt; Integer)
</span><a href="#local-6989586621681026210"><span class="hs-identifier hs-var">maybe_conversion</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026220"><span class="hs-identifier hs-var">conv</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-243"></span><span>        </span><span class="hs-comment">-- and this is a comparison operation:</span><span>
</span><span id="line-244"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026209"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026209"><span class="hs-identifier hs-var">narrow_cmp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Width -&gt; Bool -&gt; Maybe MachOp
</span><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026221"><span class="hs-identifier hs-var">cmp</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026213"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681026212"><span class="hs-identifier hs-var">signed</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-245"></span><span>        </span><span class="hs-comment">-- and the literal fits in the smaller size:</span><span>
</span><span id="line-246"></span><span>    </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026218"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="#local-6989586621681026211"><span class="hs-identifier hs-var">narrow_fn</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026213"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026218"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-247"></span><span>        </span><span class="hs-comment">-- then we can do the comparison at the smaller size</span><span>
</span><span id="line-248"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026222"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026209"><span class="hs-identifier hs-var">narrow_cmp</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026219"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026218"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026213"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-250"></span><span>    </span><span id="local-6989586621681026210"><span class="annot"><span class="annottext">maybe_conversion :: MachOp -&gt; Maybe (Width, Bool, Width -&gt; Integer -&gt; Integer)
</span><a href="#local-6989586621681026210"><span class="hs-identifier hs-var hs-var">maybe_conversion</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_UU_Conv"><span class="hs-identifier hs-type">MO_UU_Conv</span></a></span><span> </span><span id="local-6989586621681026205"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026205"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681026204"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026204"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-251"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026204"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026205"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-252"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Width, Bool, Width -&gt; Integer -&gt; Integer)
-&gt; Maybe (Width, Bool, Width -&gt; Integer -&gt; Integer)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026205"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowU"><span class="hs-identifier hs-var">narrowU</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-253"></span><span>    </span><span class="annot"><a href="#local-6989586621681026210"><span class="hs-identifier hs-var">maybe_conversion</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_SS_Conv"><span class="hs-identifier hs-type">MO_SS_Conv</span></a></span><span> </span><span id="local-6989586621681026203"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026203"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681026202"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026202"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026202"><span class="hs-identifier hs-var">to</span></a></span><span> </span><span class="annot"><span class="annottext">Width -&gt; Width -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026203"><span class="hs-identifier hs-var">from</span></a></span><span>
</span><span id="line-255"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Width, Bool, Width -&gt; Integer -&gt; Integer)
-&gt; Maybe (Width, Bool, Width -&gt; Integer -&gt; Integer)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026203"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; Integer
</span><a href="GHC.Cmm.Type.html#narrowS"><span class="hs-identifier hs-var">narrowS</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span>        </span><span class="hs-comment">-- don't attempt to apply this optimisation when the source</span><span>
</span><span id="line-258"></span><span>        </span><span class="hs-comment">-- is a float; see #1916</span><span>
</span><span id="line-259"></span><span>    </span><span class="annot"><a href="#local-6989586621681026210"><span class="hs-identifier hs-var">maybe_conversion</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Width, Bool, Width -&gt; Integer -&gt; Integer)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span>        </span><span class="hs-comment">-- careful (#2080): if the original comparison was signed, but</span><span>
</span><span id="line-262"></span><span>        </span><span class="hs-comment">-- we were doing an unsigned widen, then we must do an</span><span>
</span><span id="line-263"></span><span>        </span><span class="hs-comment">-- unsigned comparison at the smaller size.</span><span>
</span><span id="line-264"></span><span>    </span><span id="local-6989586621681026208"><span class="annot"><span class="annottext">maybe_comparison :: MachOp -&gt; Width -&gt; Bool -&gt; Maybe MachOp
</span><a href="#local-6989586621681026208"><span class="hs-identifier hs-var hs-var">maybe_comparison</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-type">MO_U_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026201"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026201"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-var">MO_U_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026201"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-265"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-type">MO_U_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026200"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026200"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-var">MO_U_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026200"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-type">MO_U_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026199"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026199"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-var">MO_U_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026199"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-type">MO_U_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026198"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026198"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-var">MO_U_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026198"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-type">MO_Eq</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026197"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026197"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-var">MO_Eq</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026197"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-type">MO_S_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026196"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026196"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-var">MO_S_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026196"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-270"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-type">MO_S_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026195"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026195"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-var">MO_S_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026195"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-type">MO_S_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026194"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026194"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-var">MO_S_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026194"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-type">MO_S_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026193"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026193"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-var">MO_S_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026193"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-type">MO_S_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026192"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026192"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-var">MO_U_Gt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026192"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-274"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-type">MO_S_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026191"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026191"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-var">MO_U_Ge</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026191"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-type">MO_S_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026190"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026190"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-var">MO_U_Lt</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026190"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-type">MO_S_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681026189"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026189"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; Maybe MachOp
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-var">MO_U_Le</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026189"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span>    </span><span class="annot"><a href="#local-6989586621681026208"><span class="hs-identifier hs-var">maybe_comparison</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe MachOp
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-comment">-- We can often do something with constants of 0 and 1 ...</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- See Note [Comparison operators]</span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026188"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026188"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026187"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026187"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026186"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681026185"><span class="annot"><span class="annottext">y :: CmmExpr
</span><a href="#local-6989586621681026185"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-283"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026187"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-284"></span><span>        </span><span class="hs-comment">-- Arithmetic</span><span>
</span><span id="line-285"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-type">MO_Add</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- x + 0 = x</span><span>
</span><span id="line-286"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-type">MO_Sub</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- x - 0 = x</span><span>
</span><span id="line-287"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026185"><span class="hs-identifier hs-var">y</span></a></span><span>   </span><span class="hs-comment">-- x * 0 = 0</span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span>        </span><span class="hs-comment">-- Logical operations</span><span>
</span><span id="line-290"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_And"><span class="hs-identifier hs-type">MO_And</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026185"><span class="hs-identifier hs-var">y</span></a></span><span>   </span><span class="hs-comment">-- x &amp;     0 = 0</span><span>
</span><span id="line-291"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Or"><span class="hs-identifier hs-type">MO_Or</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- x |     0 = x</span><span>
</span><span id="line-292"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Xor"><span class="hs-identifier hs-type">MO_Xor</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- x `xor` 0 = x</span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span>        </span><span class="hs-comment">-- Shifts</span><span>
</span><span id="line-295"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Shl"><span class="hs-identifier hs-type">MO_Shl</span></a></span><span>   </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- x &lt;&lt; 0 = x</span><span>
</span><span id="line-296"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Shr"><span class="hs-identifier hs-type">MO_S_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>   </span><span class="hs-comment">-- ditto shift-right</span><span>
</span><span id="line-297"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Shr"><span class="hs-identifier hs-type">MO_U_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>        </span><span class="hs-comment">-- Comparisons; these ones are trickier</span><span>
</span><span id="line-300"></span><span>        </span><span class="hs-comment">-- See Note [Comparison operators]</span><span>
</span><span id="line-301"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Ne"><span class="hs-identifier hs-type">MO_Ne</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>                </span><span class="hs-comment">-- (x &gt; y) != 0  =  x &gt; y</span><span>
</span><span id="line-302"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-type">MO_Eq</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026183"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026183"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026183"><span class="hs-identifier hs-var">x'</span></a></span><span>  </span><span class="hs-comment">-- (x &gt; y) == 0  =  x &lt;= y</span><span>
</span><span id="line-303"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-type">MO_U_Gt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>                </span><span class="hs-comment">-- (x &gt; y) &gt; 0   =  x &gt; y</span><span>
</span><span id="line-304"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-type">MO_S_Gt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span>                </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-305"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-type">MO_U_Lt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026181"><span class="hs-identifier hs-var">zero</span></a></span><span>             </span><span class="hs-comment">-- (x &gt; y) &lt; 0  =  0</span><span>
</span><span id="line-306"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-type">MO_S_Lt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026181"><span class="hs-identifier hs-var">zero</span></a></span><span>
</span><span id="line-307"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-type">MO_U_Ge</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026180"><span class="hs-identifier hs-var">one</span></a></span><span>              </span><span class="hs-comment">-- (x &gt; y) &gt;= 0  =  1</span><span>
</span><span id="line-308"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-type">MO_S_Ge</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026180"><span class="hs-identifier hs-var">one</span></a></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-type">MO_U_Le</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026179"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026179"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026179"><span class="hs-identifier hs-var">x'</span></a></span><span>  </span><span class="hs-comment">-- (x &gt; y) &lt;= 0  =  x &lt;= y</span><span>
</span><span id="line-311"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-type">MO_S_Le</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026178"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026178"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026186"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026178"><span class="hs-identifier hs-var">x'</span></a></span><span>
</span><span id="line-312"></span><span>        </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-314"></span><span>    </span><span id="local-6989586621681026181"><span class="annot"><span class="annottext">zero :: CmmExpr
</span><a href="#local-6989586621681026181"><span class="hs-identifier hs-var hs-var">zero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026188"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-315"></span><span>    </span><span id="local-6989586621681026180"><span class="annot"><span class="annottext">one :: CmmExpr
</span><a href="#local-6989586621681026180"><span class="hs-identifier hs-var hs-var">one</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026188"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026177"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026177"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026176"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026176"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026175"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span id="local-6989586621681026174"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026174"><span class="hs-identifier hs-var">rep</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-318"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026176"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-319"></span><span>        </span><span class="hs-comment">-- Arithmetic: x*1 = x, etc</span><span>
</span><span id="line-320"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-321"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Quot"><span class="hs-identifier hs-type">MO_S_Quot</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-322"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Quot"><span class="hs-identifier hs-type">MO_U_Quot</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-323"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Rem"><span class="hs-identifier hs-type">MO_S_Rem</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026174"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Rem"><span class="hs-identifier hs-type">MO_U_Rem</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(CmmExpr -&gt; Maybe CmmExpr) -&gt; CmmExpr -&gt; Maybe CmmExpr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026174"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span>        </span><span class="hs-comment">-- Comparisons; trickier</span><span>
</span><span id="line-327"></span><span>        </span><span class="hs-comment">-- See Note [Comparison operators]</span><span>
</span><span id="line-328"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Ne"><span class="hs-identifier hs-type">MO_Ne</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026173"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026173"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026173"><span class="hs-identifier hs-var">x'</span></a></span><span>  </span><span class="hs-comment">-- (x&gt;y) != 1  =  x&lt;=y</span><span>
</span><span id="line-329"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Eq"><span class="hs-identifier hs-type">MO_Eq</span></a></span><span>    </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>                </span><span class="hs-comment">-- (x&gt;y) == 1  =  x&gt;y</span><span>
</span><span id="line-330"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Lt"><span class="hs-identifier hs-type">MO_U_Lt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026172"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026172"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026172"><span class="hs-identifier hs-var">x'</span></a></span><span>  </span><span class="hs-comment">-- (x&gt;y) &lt; 1   =  x&lt;=y</span><span>
</span><span id="line-331"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Lt"><span class="hs-identifier hs-type">MO_S_Lt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026171"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026171"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
</span><a href="GHC.Cmm.Expr.html#maybeInvertCmmExpr"><span class="hs-identifier hs-var">maybeInvertCmmExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026171"><span class="hs-identifier hs-var">x'</span></a></span><span>  </span><span class="hs-comment">-- ditto</span><span>
</span><span id="line-332"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Gt"><span class="hs-identifier hs-type">MO_U_Gt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026170"><span class="hs-identifier hs-var">zero</span></a></span><span>             </span><span class="hs-comment">-- (x&gt;y) &gt; 1   = 0</span><span>
</span><span id="line-333"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Gt"><span class="hs-identifier hs-type">MO_S_Gt</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026170"><span class="hs-identifier hs-var">zero</span></a></span><span>
</span><span id="line-334"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Le"><span class="hs-identifier hs-type">MO_U_Le</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026169"><span class="hs-identifier hs-var">one</span></a></span><span>              </span><span class="hs-comment">-- (x&gt;y) &lt;= 1  = 1</span><span>
</span><span id="line-335"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Le"><span class="hs-identifier hs-type">MO_S_Le</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026169"><span class="hs-identifier hs-var">one</span></a></span><span>
</span><span id="line-336"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Ge"><span class="hs-identifier hs-type">MO_U_Ge</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>                </span><span class="hs-comment">-- (x&gt;y) &gt;= 1  = x&gt;y</span><span>
</span><span id="line-337"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Ge"><span class="hs-identifier hs-type">MO_S_Ge</span></a></span><span>  </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Utils.html#isComparisonExpr"><span class="hs-identifier hs-var">isComparisonExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026175"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-338"></span><span>        </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-339"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-340"></span><span>    </span><span id="local-6989586621681026170"><span class="annot"><span class="annottext">zero :: CmmExpr
</span><a href="#local-6989586621681026170"><span class="hs-identifier hs-var hs-var">zero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026177"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-341"></span><span>    </span><span id="local-6989586621681026169"><span class="annot"><span class="annottext">one :: CmmExpr
</span><a href="#local-6989586621681026169"><span class="hs-identifier hs-var hs-var">one</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Width
</span><a href="GHC.Cmm.Type.html#wordWidth"><span class="hs-identifier hs-var">wordWidth</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026177"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span class="hs-comment">-- Now look for multiplication/division by powers of 2 (integers).</span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span id="local-6989586621681026168"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681026167"><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026167"><span class="hs-identifier hs-var">mop</span></a></span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621681026166"><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-type">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-type">CmmInt</span></a></span><span> </span><span id="local-6989586621681026165"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">Width
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-346"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026167"><span class="hs-identifier hs-var">mop</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-347"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_Mul"><span class="hs-identifier hs-type">MO_Mul</span></a></span><span> </span><span id="local-6989586621681026164"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026164"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-348"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026163"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026163"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
</span><a href="GHC.Utils.Misc.html#exactLog2"><span class="hs-identifier hs-var">exactLog2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-349"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Shl"><span class="hs-identifier hs-var">MO_Shl</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026164"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026163"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026164"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-350"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Quot"><span class="hs-identifier hs-type">MO_U_Quot</span></a></span><span> </span><span id="local-6989586621681026161"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026161"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-351"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026160"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026160"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
</span><a href="GHC.Utils.Misc.html#exactLog2"><span class="hs-identifier hs-var">exactLog2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-352"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Shr"><span class="hs-identifier hs-var">MO_U_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026161"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026160"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026161"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_U_Rem"><span class="hs-identifier hs-type">MO_U_Rem</span></a></span><span> </span><span id="local-6989586621681026159"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026159"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-354"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
</span><a href="GHC.Utils.Misc.html#exactLog2"><span class="hs-identifier hs-var">exactLog2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-355"></span><span>                 </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_And"><span class="hs-identifier hs-var">MO_And</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026159"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026159"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-356"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Quot"><span class="hs-identifier hs-type">MO_S_Quot</span></a></span><span> </span><span id="local-6989586621681026158"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026158"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-357"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026157"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026157"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
</span><a href="GHC.Utils.Misc.html#exactLog2"><span class="hs-identifier hs-var">exactLog2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-358"></span><span>             </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>   </span><span class="hs-comment">-- We duplicate x in signedQuotRemHelper, hence require</span><span>
</span><span id="line-359"></span><span>                                </span><span class="hs-comment">-- it is a reg.  FIXME: remove this restriction.</span><span>
</span><span id="line-360"></span><span>                </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Shr"><span class="hs-identifier hs-var">MO_S_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026158"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span>                  </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; CmmExpr
</span><a href="#local-6989586621681026156"><span class="hs-identifier hs-var">signedQuotRemHelper</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026158"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026157"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026157"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026158"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>        </span><span class="annot"><a href="GHC.Cmm.MachOp.html#MO_S_Rem"><span class="hs-identifier hs-type">MO_S_Rem</span></a></span><span> </span><span id="local-6989586621681026155"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026155"><span class="hs-identifier hs-var">rep</span></a></span></span><span>
</span><span id="line-363"></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681026154"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026154"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
</span><a href="GHC.Utils.Misc.html#exactLog2"><span class="hs-identifier hs-var">exactLog2</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-364"></span><span>             </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmReg
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>   </span><span class="hs-comment">-- We duplicate x in signedQuotRemHelper, hence require</span><span>
</span><span id="line-365"></span><span>                                </span><span class="hs-comment">-- it is a reg.  FIXME: remove this restriction.</span><span>
</span><span id="line-366"></span><span>                </span><span class="hs-comment">-- We replace (x `rem` 2^p) by (x - (x `quot` 2^p) * 2^p).</span><span>
</span><span id="line-367"></span><span>                </span><span class="hs-comment">-- Moreover, we fuse MO_S_Shr (last operation of MO_S_Quot)</span><span>
</span><span id="line-368"></span><span>                </span><span class="hs-comment">-- and MO_S_Shl (multiplication by 2^p) into a single MO_And operation.</span><span>
</span><span id="line-369"></span><span>                </span><span class="annot"><span class="annottext">CmmExpr -&gt; Maybe CmmExpr
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Sub"><span class="hs-identifier hs-var">MO_Sub</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026155"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span><span>                    </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Opt.html#cmmMachOpFold"><span class="hs-identifier hs-var">cmmMachOpFold</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681026168"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_And"><span class="hs-identifier hs-var">MO_And</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026155"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-371"></span><span>                      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Width -&gt; Integer -&gt; CmmExpr
</span><a href="#local-6989586621681026156"><span class="hs-identifier hs-var">signedQuotRemHelper</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026155"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026154"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026155"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-372"></span><span>        </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-373"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-374"></span><span>    </span><span class="hs-comment">-- In contrast with unsigned integers, for signed ones</span><span>
</span><span id="line-375"></span><span>    </span><span class="hs-comment">-- shift right is not the same as quot, because it rounds</span><span>
</span><span id="line-376"></span><span>    </span><span class="hs-comment">-- to minus infinity, whereas quot rounds toward zero.</span><span>
</span><span id="line-377"></span><span>    </span><span class="hs-comment">-- To fix this up, we add one less than the divisor to the</span><span>
</span><span id="line-378"></span><span>    </span><span class="hs-comment">-- dividend if it is a negative number.</span><span>
</span><span id="line-379"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-380"></span><span>    </span><span class="hs-comment">-- to avoid a test/jump, we use the following sequence:</span><span>
</span><span id="line-381"></span><span>    </span><span class="hs-comment">--      x1 = x &gt;&gt; word_size-1  (all 1s if -ve, all 0s if +ve)</span><span>
</span><span id="line-382"></span><span>    </span><span class="hs-comment">--      x2 = y &amp; (divisor-1)</span><span>
</span><span id="line-383"></span><span>    </span><span class="hs-comment">--      result = x + x2</span><span>
</span><span id="line-384"></span><span>    </span><span class="hs-comment">-- this could be done a bit more simply using conditional moves,</span><span>
</span><span id="line-385"></span><span>    </span><span class="hs-comment">-- but we're processor independent here.</span><span>
</span><span id="line-386"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-387"></span><span>    </span><span class="hs-comment">-- we optimise the divide by 2 case slightly, generating</span><span>
</span><span id="line-388"></span><span>    </span><span class="hs-comment">--      x1 = x &gt;&gt; word_size-1  (unsigned)</span><span>
</span><span id="line-389"></span><span>    </span><span class="hs-comment">--      return = x + x1</span><span>
</span><span id="line-390"></span><span>    </span><span class="annot"><a href="#local-6989586621681026156"><span class="hs-identifier hs-type">signedQuotRemHelper</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Type.html#Width"><span class="hs-identifier hs-type">Width</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Integer</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span>
</span><span id="line-391"></span><span>    </span><span id="local-6989586621681026156"><span class="annot"><span class="annottext">signedQuotRemHelper :: Width -&gt; Integer -&gt; CmmExpr
</span><a href="#local-6989586621681026156"><span class="hs-identifier hs-var hs-var">signedQuotRemHelper</span></a></span></span><span> </span><span id="local-6989586621681026153"><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span></span><span> </span><span id="local-6989586621681026152"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026152"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_Add"><span class="hs-identifier hs-var">MO_Add</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026151"><span class="hs-identifier hs-var">x2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-392"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-393"></span><span>        </span><span id="local-6989586621681026145"><span class="annot"><span class="annottext">bits :: Integer
</span><a href="#local-6989586621681026145"><span class="hs-identifier hs-var hs-var">bits</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; Int
</span><a href="GHC.Cmm.Type.html#widthInBits"><span class="hs-identifier hs-var">widthInBits</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-394"></span><span>        </span><span id="local-6989586621681026141"><span class="annot"><span class="annottext">shr :: MachOp
</span><a href="#local-6989586621681026141"><span class="hs-identifier hs-var hs-var">shr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026152"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_U_Shr"><span class="hs-identifier hs-var">MO_U_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_S_Shr"><span class="hs-identifier hs-var">MO_S_Shr</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span>
</span><span id="line-395"></span><span>        </span><span id="local-6989586621681026140"><span class="annot"><span class="annottext">x1 :: CmmExpr
</span><a href="#local-6989586621681026140"><span class="hs-identifier hs-var hs-var">x1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><a href="#local-6989586621681026141"><span class="hs-identifier hs-var">shr</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026166"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026145"><span class="hs-identifier hs-var">bits</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-396"></span><span>        </span><span id="local-6989586621681026151"><span class="annot"><span class="annottext">x2 :: CmmExpr
</span><a href="#local-6989586621681026151"><span class="hs-identifier hs-var hs-var">x2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026152"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026140"><span class="hs-identifier hs-var">x1</span></a></span><span> </span><span class="hs-keyword">else</span><span>
</span><span id="line-397"></span><span>             </span><span class="annot"><span class="annottext">MachOp -&gt; [CmmExpr] -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmMachOp"><span class="hs-identifier hs-var">CmmMachOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Width -&gt; MachOp
</span><a href="GHC.Cmm.MachOp.html#MO_And"><span class="hs-identifier hs-var">MO_And</span></a></span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CmmExpr
</span><a href="#local-6989586621681026140"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CmmLit -&gt; CmmExpr
</span><a href="GHC.Cmm.Expr.html#CmmLit"><span class="hs-identifier hs-var">CmmLit</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Width -&gt; CmmLit
</span><a href="GHC.Cmm.Expr.html#CmmInt"><span class="hs-identifier hs-var">CmmInt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621681026165"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Width
</span><a href="#local-6989586621681026153"><span class="hs-identifier hs-var">rep</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-398"></span><span>
</span><span id="line-399"></span><span class="hs-comment">-- ToDo (#7116): optimise floating-point multiplication, e.g. x*2.0 -&gt; x+x</span><span>
</span><span id="line-400"></span><span class="hs-comment">-- Unfortunately this needs a unique supply because x might not be a</span><span>
</span><span id="line-401"></span><span class="hs-comment">-- register.  See #2253 (program 6) for an example.</span><span>
</span><span id="line-402"></span><span>
</span><span id="line-403"></span><span>
</span><span id="line-404"></span><span class="hs-comment">-- Anything else is just too hard.</span><span>
</span><span id="line-405"></span><span>
</span><span id="line-406"></span><span class="annot"><a href="GHC.Cmm.Opt.html#cmmMachOpFoldM"><span class="hs-identifier hs-var">cmmMachOpFoldM</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">MachOp
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[CmmExpr]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CmmExpr
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-407"></span><span>
</span><span id="line-408"></span><span class="hs-comment">{- Note [Comparison operators]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we have
   CmmCondBranch ((x&gt;#y) == 1) t f
we really want to convert to
   CmmCondBranch (x&gt;#y) t f

That's what the constant-folding operations on comparison operators do above.
-}</span><span>
</span><span id="line-417"></span><span>
</span><span id="line-418"></span><span>
</span><span id="line-419"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-420"></span><span class="hs-comment">-- Utils</span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span class="annot"><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-type">isPicReg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmExpr"><span class="hs-identifier hs-type">CmmExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-423"></span><span id="isPicReg"><span class="annot"><span class="annottext">isPicReg :: CmmExpr -&gt; Bool
</span><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-var hs-var">isPicReg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmReg"><span class="hs-identifier hs-type">CmmReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#CmmGlobal"><span class="hs-identifier hs-type">CmmGlobal</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalReg
</span><a href="GHC.Cmm.Expr.html#PicBaseReg"><span class="hs-identifier hs-var">PicBaseReg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-424"></span><span class="annot"><a href="GHC.Cmm.Opt.html#isPicReg"><span class="hs-identifier hs-var">isPicReg</span></a></span><span> </span><span class="annot"><span class="annottext">CmmExpr
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-425"></span></pre></body></html>